package com.example.sfm.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDate;

@Data
@Accessors(chain = true)
@Schema(name = "奖惩记录传输对象",description = "用于接收学生奖惩记录信息")
public class AwardsPunishmentsDto {
    @Schema(description = "学生ID", deprecated = true )
    @NotNull(message = "学生ID不能为空")
    private Integer studentId;

    @Schema(description = "奖惩名称", deprecated = true)
    @NotNull(message = "奖惩名称不能为空")
    private String name;

    @Schema(description = "类型（0=奖励,1=惩罚）", deprecated = true)
    @Range(min = 0, max = 1, message = "类型取值0-1")
    private Integer type;

    @Schema(description = "等级（0=一般,1=严重）", deprecated = true)
    @Range(min = 0, max = 1, message = "等级取值0-1")
    private Integer level;

    @Schema(description = "原因", deprecated = true)
    @NotBlank(message = "原因不能为空")
    @Size(max = 500, message = "原因长度不能超过500字")
    private String reason;

    @Schema(description = "颁发日期（格式：yyyy-MM-dd）", deprecated = true)
    @NotNull(message = "颁发日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate issuedDate;
}
